<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function getNum(n, m) {
      return Math.floor(Math.random() * (m - n + 1)) + n
    }
    getNum(1, 10)
    let ik = getNum(1, 10)
    while (true) {
      let kk = +prompt("无奖竞猜，请输入数字0~10")
      if (kk > ik) {
        alert("猜大了，真他娘的背！")
      }
      if (kk < ik) {
        alert("猜小了，真他娘的背！")
      }
      if (kk === ik) {
        alert("恭喜这个比，猜对了！")
        break
      }
    }


    // let odd = {
    //   uname: "pink老师",
    //   num: 10086,
    //   gender: "男"
    // }
    // console.log(odd.uname);
  </script>
</body>

</html>